package com.shen.driver;

/**
 * Author:shen
 * CreateDate:2020/5/11.
 * Function:
 */
public class Ship {
    private int weight;//载重
    private int displacement;//排水量
    private int speed;//航速

    public Ship() {
    }

    public Ship(int weight, int displacement, int speed) {
        this.weight = weight;
        this.displacement = displacement;
        this.speed = speed;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getDisplacement() {
        return displacement;
    }

    public void setDisplacement(int displacement) {
        this.displacement = displacement;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    /**
     * 船启航
     */
    public void start(){
        System.out.println("船------启航");
    }
    /**
     * 鸣笛
     */
    public void honking(){
        System.out.println("船------鸣笛");
    }
    /**
     * 抛锚
     */
    public void anchor(){
        System.out.println("船------抛锚");
    }
}
